home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NetNews Offline 2
/
NetNews Offline Volume 2.iso
/
news
/
comp
/
std
/
c
/
82
< prev
next >
Wrap
Internet Message Format
|
1996-08-06
|
1KB
Path: news.rmii.com!usenet
From: jcoffin@rmii.com (Jerry Coffin)
Newsgroups: comp.std.c
Subject: Re: int's and zero
Date: Thu, 11 Jan 1996 23:10:15 GMT
Organization: TAEUS
Message-ID: <4d41dk$o84@natasha.rmii.com>
References: <4cth4e$4q@odin.funcom.no> <4cub1a$jbl@alterdial.UU.NET> <4d12qv$fir@natasha.rmii.com> <DKzpI8.8Kx@stdc.demon.co.uk>
NNTP-Posting-Host: slip8150.rmii.com
X-Newsreader: Forte Free Agent 1.0.82
clive@stdc.demon.co.uk (Clive D.W. Feather) wrote:
>In article <4d12qv$fir@natasha.rmii.com>,
>Jerry Coffin <jcoffin@rmii.com> wrote:
>> Yes -- in one's complement, `-0' is represented with all bits set to 1.
>> With one's complement, the usual method of testing for 0 is something
>> like: `if (x+0 == 0)' since the addition of 0 normally produces a
>> positive 0.
>The C Standard requires +0 and -0 to compare equal to each other.
Sorry. I should have been more explicit - the "something like" was
meant to imply that this had to happen internally, not that it would be
included in the source code.
Later,
Jerry.
/* I can barely express my own opinions; I certainly can't
* express anybody else's.
*
* The universe is a figment of its own imagination.
*/